@extends('admin_system/public/layout')
@section('content')
    <div class="col-xs-12 nav top-nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>分会管理>>学习官</p>

        <a class="btn-default btn float-right back ml10" href="{{asset('admin_system/chapter/prisidentEdit')}}">返回</a>
        <a class="btn-danger btn float-right" href="{{asset('admin_system/chapter/prisidentEdit')}}">新增会长</a>
    </div>


    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <form class="form-inline nav mb10" method="get" action="{{asset('admin_system/chapter/companys')}}">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon">查询</div>
                    <input type="hidden" name="chapterId" value="{{$chapterId}}">
                    <input name="keywords" class="form-control"  placeholder="按公司名称查询" value="{{$keywords}}">
                    {{csrf_field()}}
                </div>
            </div>
            <button type="submit" class="btn btn-primary">搜索</button>
        </form>


        <table class="table table-bordered">
            <tr class="active">
                <th>序号</th>
                <th>企业名称</th>
                <th>学习官</th>
                <th>加入时间</th>
                <th></th>
            </tr>


            @foreach($companys as $company)

                <tr>
                    <td>{{$loop->iteration + ($companys->currentPage()-1) * $companys->perPage()}}</td>
                    <td>{{$company->company_name}}</td>
                    <td>{{$company->YourName}}</td>
                    <td>{{$company->add_time}}</td>
                    <td>
                        <a href="{{asset('admin_system/chapter/companyDelete?officerId='.$company->chapter_company_id)}}">删除</a>
                        <a href="{{asset('admin_system/chapter/companyEditIndex?officerId='.$company->chapter_company_id)}}">编辑</a>
                    </td>
                </tr>

            @endforeach
        </table>
    </div>
@endsection
